package com.rongke.model;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rongke.utils.DateJsonDeserializer;
import com.rongke.utils.DateJsonSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Questionnaire
 * @调查问卷(questionnaire)
 * @version : Ver 1.0
 */
@TableName("questionnaire")
public class Questionnaire implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:调查问卷id
	 * @字段:id BIGINT(19)
	 */
	@TableId(type = IdType.AUTO)
	private java.lang.Long id;


	/**
	 * @备注:标题
	 * @字段:title VARCHAR(50)
	 */
	private java.lang.String title;


	/**
	 * @备注:内容
	 * @字段:content TEXT(65535)
	 */
	private java.lang.String content;

	/**
	 * 问卷奖励金额
	 */
	private BigDecimal bonus;

	/**
	 * 问卷类型（1 试用众测问卷 2 赚钱填问卷）
	 */
	private Integer type;

    /**
     * @备注:到期时间
     * @字段:upt_datetime DATETIME(19)
     */
    @JsonSerialize(using=DateJsonSerializer.class)
    @JsonDeserialize(using=DateJsonDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private Date expireTime;

	/**
	 * @备注:创建时间
	 * @字段:addtime DATETIME(19)
	 */
	private java.util.Date addtime;


	public Questionnaire(){
	}

	public Questionnaire(
		java.lang.Long id
	){
		this.id = id;
	}



	public void setId(java.lang.Long id) {
		this.id = id;
	}

	public java.lang.Long getId() {
		return this.id;
	}


	public void setTitle(java.lang.String title) {
		this.title = title;
	}

	public java.lang.String getTitle() {
		return this.title;
	}


	public void setContent(java.lang.String content) {
		this.content = content;
	}

	public java.lang.String getContent() {
		return this.content;
	}


	public void setAddtime(java.util.Date addtime) {
		this.addtime = addtime;
	}

	public java.util.Date getAddtime() {
		return this.addtime;
	}

	public BigDecimal getBonus() {
		return bonus;
	}

	public void setBonus(BigDecimal bonus) {
		this.bonus = bonus;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

    public Date getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }
}
